Expose AWS connector setup, create, and verify - #1780
Conversation
f675a01 to
221c4f2
Compare
221c4f2 to
48afb16
Compare
48afb16 to
ae85b3e
Compare
There was a problem hiding this comment.
All reported issues were addressed across 59 files
Tip: instead of fixing issues one by one fix them all with cubic
Re-trigger cubic
ae85b3e to
303da65
Compare
303da65 to
5f33678
Compare
There was a problem hiding this comment.
All reported issues were addressed across 60 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 6 unresolved issues already reported by Cubic.
Fix all with cubic | Re-trigger cubic
5f33678 to
2f8648e
Compare
There was a problem hiding this comment.
All reported issues were addressed across 58 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 3 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
2f8648e to
802b031
Compare
802b031 to
3f523ec
Compare
There was a problem hiding this comment.
All reported issues were addressed across 58 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 6 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
3d5fadc to
6bd3124
Compare
There was a problem hiding this comment.
All reported issues were addressed across 49 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 6 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
6bd3124 to
4e6bf9d
Compare
There was a problem hiding this comment.
All reported issues were addressed across 49 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
4e6bf9d to
b0cb603
Compare
b0cb603 to
90fdf18
Compare
There was a problem hiding this comment.
All reported issues were addressed across 57 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
90fdf18 to
89baca3
Compare
There was a problem hiding this comment.
All reported issues were addressed across 57 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 4 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
89baca3 to
1f4567d
Compare
There was a problem hiding this comment.
All reported issues were addressed across 57 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
1f4567d to
0174c01
Compare
There was a problem hiding this comment.
All reported issues were addressed across 50 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 2 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
0174c01 to
df3ec50
Compare
There was a problem hiding this comment.
All reported issues were addressed across 52 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 7 unresolved issues already reported by Cubic.
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
df3ec50 to
0b67a53
Compare
There was a problem hiding this comment.
All reported issues were addressed across 55 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Fix all with cubic | Re-trigger cubic
0b67a53 to
cac2859
Compare
There was a problem hiding this comment.
All reported issues were addressed across 57 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
7e96ea4 to
f900d70
Compare
There was a problem hiding this comment.
All reported issues were addressed across 57 files (changes from recent commits).
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
a7b46ea to
5c2ffbf
Compare
The access-review driver can assume an audit role, but operators had no supported path to create that connector. Add GraphQL, MCP, CLI, and n8n operations plus a console dialog so a single AWS account can be connected with server-built setup artifacts and named verification checks. The connector now copies a registry module snippet and records a role ARN. Document getprobo/audit-role/aws, the issuer URL without an /org/ segment, and the probe-by-assume path so Terraform and CloudFormation stay in parity and operators do not invent values. Signed-off-by: Ludovic Vielle <ludovic@probo.com>
5c2ffbf to
66c1aa3
Compare
There was a problem hiding this comment.
7 issues found across 66 files (changes from recent commits).
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="packages/n8n-node/nodes/Probo/actions/accessReviewSource/probe.operation.ts">
<violation number="1" location="packages/n8n-node/nodes/Probo/actions/accessReviewSource/probe.operation.ts:25">
P1: This module is never registered by the access-review-source resource, so n8n omits the `probe` operation and cannot execute this new code. Register its operation option, description, and export in the resource index.</violation>
</file>
<file name="packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts">
<violation number="1" location="packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts:98">
P2: When connector creation commits but its response is lost or contains a resolver error, this await exits before cleanup starts and leaves an unreferenced connector. Make the creation flow idempotent or reconcile the connector after unsuccessful responses so retries cannot accumulate orphaned connectors.</violation>
</file>
<file name="pkg/server/api/console/v1/connector_connection_status.go">
<violation number="1" location="pkg/server/api/console/v1/connector_connection_status.go:88">
P2: When `SourceNeedsReconnect` fails, this log omits `connectorID`, so identical lookup or decryption failures cannot be attributed to a connector. Include the connector ID in this error log.</violation>
</file>
<file name="pkg/cmd/access-review/source/probe/probe.go">
<violation number="1" location="pkg/cmd/access-review/source/probe/probe.go:70">
P1: The new command is never registered with the `source` command, so `prb access-review source probe` is unavailable. Register `probe.NewCmdProbe(f)` in the parent command.</violation>
</file>
<file name="pkg/cloud/aws/setup.go">
<violation number="1" location="pkg/cloud/aws/setup.go:139">
P2: When a customer uses a valid IAM role path containing characters outside `[\w+=,.@-]`, `NewConnectorSettings` rejects the ARN even though AWS accepts it. Validate the ARN with AWS’s ARN parser and separately enforce only the supported partition and IAM-role constraints, or broaden the shared path grammar.</violation>
</file>
<file name="pkg/connector/provider/registry_test.go">
<violation number="1" location="pkg/connector/provider/registry_test.go:145">
P3: The new `WorkloadIdentityExtraSettings` check in TestEveryProviderSettingsReachADialog is a tautology: WorkloadIdentityExtraSettings() already returns nil when SupportsWorkloadIdentity() is false (both derive from `WorkloadIdentity != nil`), so the assertion can never fail and pins nothing. Unlike the API-key sibling (whose SupportsAPIKey is false for a managed key), there is no case where a WLI settings list reaches an unoffered path. Either drop the block or assert a condition that the list length cannot already imply.</violation>
</file>
<file name="pkg/awsx/arn/arn.go">
<violation number="1" location="pkg/awsx/arn/arn.go:50">
P2: Existing IAM roles with valid path characters outside `\w+=,.@-` cannot be connected because `ParseRole` rejects their ARNs. Use IAM’s printable-ASCII path grammar while retaining the restricted 64-character class for the final role name, and keep the console validator in sync.</violation>
</file>
Tip: instead of fixing issues one by one fix them all with cubic
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| import { NodeOperationError } from 'n8n-workflow'; | ||
| import { proboApiRequest } from '../../GenericFunctions'; | ||
|
|
||
| export const description: INodeProperties[] = [ |
There was a problem hiding this comment.
P1: This module is never registered by the access-review-source resource, so n8n omits the probe operation and cannot execute this new code. Register its operation option, description, and export in the resource index.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/n8n-node/nodes/Probo/actions/accessReviewSource/probe.operation.ts, line 25:
<comment>This module is never registered by the access-review-source resource, so n8n omits the `probe` operation and cannot execute this new code. Register its operation option, description, and export in the resource index.</comment>
<file context>
@@ -0,0 +1,96 @@
+import { NodeOperationError } from 'n8n-workflow';
+import { proboApiRequest } from '../../GenericFunctions';
+
+export const description: INodeProperties[] = [
+ {
+ displayName: 'Access Review Source ID',
</file context>
| } | ||
| ) | ||
|
|
||
| func NewCmdProbe(f *cmdutil.Factory) *cobra.Command { |
There was a problem hiding this comment.
P1: The new command is never registered with the source command, so prb access-review source probe is unavailable. Register probe.NewCmdProbe(f) in the parent command.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/cmd/access-review/source/probe/probe.go, line 70:
<comment>The new command is never registered with the `source` command, so `prb access-review source probe` is unavailable. Register `probe.NewCmdProbe(f)` in the parent command.</comment>
<file context>
@@ -0,0 +1,136 @@
+ }
+)
+
+func NewCmdProbe(f *cmdutil.Factory) *cobra.Command {
+ cmd := &cobra.Command{
+ Use: "probe <id>",
</file context>
| awsRoleArn, | ||
| }; | ||
|
|
||
| const connectorResponse = await proboApiRequest.call(this, createConnectorQuery, { |
There was a problem hiding this comment.
P2: When connector creation commits but its response is lost or contains a resolver error, this await exits before cleanup starts and leaves an unreferenced connector. Make the creation flow idempotent or reconcile the connector after unsuccessful responses so retries cannot accumulate orphaned connectors.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/n8n-node/nodes/Probo/actions/accessReviewSource/create.operation.ts, line 98:
<comment>When connector creation commits but its response is lost or contains a resolver error, this await exits before cleanup starts and leaves an unreferenced connector. Make the creation flow idempotent or reconcile the connector after unsuccessful responses so retries cannot accumulate orphaned connectors.</comment>
<file context>
@@ -0,0 +1,178 @@
+ awsRoleArn,
+ };
+
+ const connectorResponse = await proboApiRequest.call(this, createConnectorQuery, {
+ input: connectorInput,
+ });
</file context>
| return "", err | ||
| } | ||
|
|
||
| r.logger.ErrorCtx(ctx, "cannot determine connector reconnect requirement", log.Error(err)) |
There was a problem hiding this comment.
P2: When SourceNeedsReconnect fails, this log omits connectorID, so identical lookup or decryption failures cannot be attributed to a connector. Include the connector ID in this error log.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/server/api/console/v1/connector_connection_status.go, line 88:
<comment>When `SourceNeedsReconnect` fails, this log omits `connectorID`, so identical lookup or decryption failures cannot be attributed to a connector. Include the connector ID in this error log.</comment>
<file context>
@@ -0,0 +1,98 @@
+ return "", err
+ }
+
+ r.logger.ErrorCtx(ctx, "cannot determine connector reconnect requirement", log.Error(err))
+
+ return "", gqlutils.Internal(ctx)
</file context>
| r.logger.ErrorCtx(ctx, "cannot determine connector reconnect requirement", log.Error(err)) | |
| r.logger.ErrorCtx( | |
| ctx, | |
| "cannot determine connector reconnect requirement", | |
| log.String("connector_id", connectorID.String()), | |
| log.Error(err), | |
| ) |
| func NewConnectorSettings(roleARN string) (coredata.AWSConnectorSettings, error) { | ||
| roleARN = strings.TrimSpace(roleARN) | ||
|
|
||
| if _, err := arn.ParseRole(roleARN); err != nil { |
There was a problem hiding this comment.
P2: When a customer uses a valid IAM role path containing characters outside [\w+=,.@-], NewConnectorSettings rejects the ARN even though AWS accepts it. Validate the ARN with AWS’s ARN parser and separately enforce only the supported partition and IAM-role constraints, or broaden the shared path grammar.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/cloud/aws/setup.go, line 139:
<comment>When a customer uses a valid IAM role path containing characters outside `[\w+=,.@-]`, `NewConnectorSettings` rejects the ARN even though AWS accepts it. Validate the ARN with AWS’s ARN parser and separately enforce only the supported partition and IAM-role constraints, or broaden the shared path grammar.</comment>
<file context>
@@ -0,0 +1,204 @@
+func NewConnectorSettings(roleARN string) (coredata.AWSConnectorSettings, error) {
+ roleARN = strings.TrimSpace(roleARN)
+
+ if _, err := arn.ParseRole(roleARN); err != nil {
+ if errors.Is(err, arn.ErrUnsupportedPartition) {
+ return coredata.AWSConnectorSettings{}, fmt.Errorf("cannot create aws connector: awsRoleArn is not a supported AWS partition")
</file context>
| // RoleARNPattern is the IAM role ARN grammar. Partition is group 1, | ||
| // account is group 2, role name is group 3. The console field uses | ||
| // the same expression with the three supported partitions inlined. | ||
| RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\w+=,.@-]+)*/([\w+=,.@-]{1,64})` |
There was a problem hiding this comment.
P2: Existing IAM roles with valid path characters outside \w+=,.@- cannot be connected because ParseRole rejects their ARNs. Use IAM’s printable-ASCII path grammar while retaining the restricted 64-character class for the final role name, and keep the console validator in sync.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/awsx/arn/arn.go, line 50:
<comment>Existing IAM roles with valid path characters outside `\w+=,.@-` cannot be connected because `ParseRole` rejects their ARNs. Use IAM’s printable-ASCII path grammar while retaining the restricted 64-character class for the final role name, and keep the console validator in sync.</comment>
<file context>
@@ -32,7 +36,40 @@ const (
+ // RoleARNPattern is the IAM role ARN grammar. Partition is group 1,
+ // account is group 2, role name is group 3. The console field uses
+ // the same expression with the three supported partitions inlined.
+ RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\w+=,.@-]+)*/([\w+=,.@-]{1,64})`
+)
+
</file context>
| RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\w+=,.@-]+)*/([\w+=,.@-]{1,64})` | |
| RoleARNPattern = `arn:([^:]+):iam::([0-9]{12}):role(?:/[\x21-\x7E]+)*/([\w+=,.@-]{1,64})` |
| ) | ||
| } | ||
|
|
||
| if len(reg.WorkloadIdentityExtraSettings()) > 0 { |
There was a problem hiding this comment.
P3: The new WorkloadIdentityExtraSettings check in TestEveryProviderSettingsReachADialog is a tautology: WorkloadIdentityExtraSettings() already returns nil when SupportsWorkloadIdentity() is false (both derive from WorkloadIdentity != nil), so the assertion can never fail and pins nothing. Unlike the API-key sibling (whose SupportsAPIKey is false for a managed key), there is no case where a WLI settings list reaches an unoffered path. Either drop the block or assert a condition that the list length cannot already imply.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At pkg/connector/provider/registry_test.go, line 145:
<comment>The new `WorkloadIdentityExtraSettings` check in TestEveryProviderSettingsReachADialog is a tautology: WorkloadIdentityExtraSettings() already returns nil when SupportsWorkloadIdentity() is false (both derive from `WorkloadIdentity != nil`), so the assertion can never fail and pins nothing. Unlike the API-key sibling (whose SupportsAPIKey is false for a managed key), there is no case where a WLI settings list reaches an unoffered path. Either drop the block or assert a condition that the list length cannot already imply.</comment>
<file context>
@@ -141,6 +141,15 @@ func TestEveryProviderSettingsReachADialog(t *testing.T) {
)
}
+
+ if len(reg.WorkloadIdentityExtraSettings()) > 0 {
+ assert.Truef(
+ t,
</file context>
The access-review driver can assume an audit role, but operators had no supported path to create that connector. Add GraphQL, MCP, CLI, and n8n operations plus a console dialog so a single AWS account can be connected with server-built setup artifacts and named verification checks.
Summary by cubic
Operators previously had no supported way to create the AWS audit-role connector, even though access reviews could assume the role. This adds setup, creation, and verification flows across the API, CLI, n8n, MCP, and console, with server-generated federation artifacts and named checks. AWS quick-create remains optional and requires a configured public CloudFormation template URL.
Tests
+925-11Covers AWS setup artifacts, connector creation and verification, API behavior, and provider capability discovery across end-to-end and unit tests.
GraphQL API
+367-52Adds AWS setup queries, workload-identity connector creation and verification, provider settings, and federation availability checks.
MCP
+419-16Adds setup, create, and verify tools with connector types and OpenAPI schema definitions.
prb (CLI)
+392-0Adds
prb connector setup-aws,prb connector create, andprb connector verifycommands.Service
+644-67Generates AWS setup artifacts, validates account and role configuration, and returns named checks for role assumption and trust-policy configuration.
App: console
+651-54Adds a localized workload-identity dialog that collects AWS settings, displays federation values and setup artifacts, and reports verification results.
Package: n8n-node
+328-0Adds a Connector resource with
setupAws,create, andverifyoperations.Other
+40-0Embeds the AWS audit-role CloudFormation template and adds Helm configuration for its public URL.
Written for commit 48afb16. Summary will update on new commits.